<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<title>My JSP 'list.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<style type="text/css">
.bcolor {
	background: #ddd;
}
</style>


</head>

<body>
	<form action="news_findall.action" method="post">
		<select id="search_select" onchange="shows()">
			<option value="title">标题</option>
			<option value="type">分类</option>
		</select>
		<s:select list="#request.allCategory" listValue="name" id="type"
			cssStyle="display:none" listKey="id" name="newsCategory.id"></s:select>
		<input name="search"><input type="submit" value="查询">
	</form>
	<table border=1>
		<tr>
			<td width=200>标题</td>
			<td width=100>类型</td>
			<td width=70>作者</td>
			<td width=200>发表时间</td>
			<td width=70>编辑</td>
		</tr>
		<s:iterator value="#request.allNews">
			<tr>
				<td><s:property value="title" />
				</td>
				<td><s:property value="newsCategory.name" /></td>
				<td><s:property value="author" />
				</td>
				<td><s:property value="createdate" /></td>
				<td><a
					href="news_updatebyid.action?id=<s:property value="id" /> ">编辑</a>
				</td>
			</tr>
		</s:iterator>
	</table>
</body>
</html>
